<!DOCTYPE html>
<!--添加弹窗层-->
<html>
    <head>
        <title></title>
        <link rel="stylesheet" type="text/css" href="/Public/Index/css/workflow.css">
        <link href="/Public/Admin/css/page.css" rel="stylesheet" />
        <link href="/Public/Admin/css/layer.css" rel="stylesheet" />
        <!--<link href="/Public/Admin/css/new_plan.css" rel="stylesheet" />-->
        <!--<script src="/Public/static/jquery/jquery-2.0.3.min.js"></script>-->
        <script src="/Public/static/jquery/jquery-1.11.3.js"></script>
        <script src="/Public/static/layer/layer.js"></script> 
        <script type="text/javascript" src="/Public/Admin/js/common.js" ></script>
        <script type="text/javascript" src="/Public/Admin/js/layer.js" ></script>
        <link rel="stylesheet" type="text/css" href="/Public/static/datetimepicker-master/jquery.datetimepicker.css">
        <script type="text/javascript" src="/Public/static/datetimepicker-master/rilegou/jquery.datetimepicker.full.js" ></script>
        <!--文件上传-->
        <script type="text/javascript" src="/Public/Cropper/js/ajaxfileupload.js" ></script>
        <style>
            .advice li{list-style: none;margin-bottom: 1rem;}
            .advice li:not(:last-child){border-bottom:1px solid #E7E7E7;}
            .detailInfo span{
                font-size: 15px;
                display: inline-block;
                padding: 0px 5px 5px 0px;
            }
            .feed li{list-style: none;width: 80%;margin-left: 2rem;margin-bottom: 0px;}
            .feed li:not(:last-child){border-bottom:1px dashed #E7E7E7;}
            .feed li span{display: inline-block;}
            .icon_add {
                color: #1EB500;
                font-size: 18px;
                padding-left: 0.2rem;
                vertical-align: middle;
            }
            new_plan.css:41
            .iconfont, .div_c_r, .icon_add, .arrow {
                font-family: "iconfont";
                -webkit-font-smoothing: antialiased;
                -webkit-text-stroke-width: 0.2px;
                -moz-osx-font-smoothing: grayscale;
            }
        </style>
    </head>
    <body>
    <if condition="$type eq 1">
        <form id="departForm">
            <div class="bounced">
                <div class="people_left" style='overflow:auto;overflow-y：scroll;height:329px'>
                    <ul>
                        <li class="pointer pe" data-dept="0">
                            <!--<a data-url="{:U('Index/getUserData',array('dept_id'=>'','flow_id'=>$flow_id,'run_id'=>$run_id,'prcs_id'=>$prcs_id,'auto_type'=>$auto_type))}">[符合条件]</a>-->
                            <a data-url="{:U('getAjaxPage',array('dept_id'=>'','flow_id'=>$flow_id,'run_id'=>$run_id,'prcs_id'=>$prcs_id,'auto_type'=>$auto_type))}">[符合条件]</a>

                        </li>
                        <foreach name="departs" item="depart">
                            <li class="pointer" data-dept="{$depart.dept_id}">
                                <!--<a data-url="{:U('Index/getUserData',array('dept_id'=>$depart['dept_id'],'flow_id'=>$flow_id,'run_id'=>$run_id,'prcs_id'=>$prcs_id,'auto_type'=>$auto_type))}">[{$depart.dept_name}]</a>-->
                                <a data-url="{:U('getAjaxPage',array('dept_id'=>$depart['dept_id'],'flow_id'=>$flow_id,'run_id'=>$run_id,'prcs_id'=>$prcs_id,'auto_type'=>$auto_type))}">[{$depart.dept_name}]</a>

                            </li>
                        </foreach>
                    </ul> 
                </div>
                <div class="people_right">
                    <p>全部经办人</p>
                    <if condition="$one eq 0">
                        <div class="select_people">
                            <div class="checkUser dd add-all"><a>全部添加</a></div>
                            <div class="checkUser qk add-del"><a>全部删除</a></div>
                        </div>
                    </if>
                    <div class="select_peo">
                        <ul>
                            <foreach name="users" item="user">
                                <if condition='$user["checked"] && count($users) == 1'>
                                    <li class="pointer" data-id="{$user.user_id}">
                                    <if condition="$flow_id neq null">
                                        <label class="checked"><img src="/Public/Index/img/s1.png" class="c-img">主办</label>
                                    </if>
                                    <span class="c-name checked">{$user.user_name}</span>
                                    </li> 
                                    <elseif condition="$user['checked']"/>
                                    <li class="pointer" data-id="{$user.user_id}">
                                    <if condition="$flow_id neq null">
                                        <label class=""><img src="/Public/Index/img/s2.png" class="c-img">主办</label>
                                    </if>
                                    <span class="c-name checked">{$user.user_name}</span>
                                    </li> 
                                    <else/>
                                    <li class="pointer" data-id="{$user.user_id}">
                                    <if condition="$flow_id neq null">
                                        <label><img src="/Public/Index/img/s2.png" class="c-img">主办</label>
                                    </if>
                                    <span class="c-name">{$user.user_name}</span>
                                    </li>
                                </if>
                            </foreach>
                        </ul>
                        <!--判断是否为流程中的选择人员，$id不存在则为其他模块-->
                        <input type="hidden" name="id" value="{$id|default=0}">
                        <input type="hidden" name="table_key" value="{$table_key|default=0}">
                        <input type="hidden" name="flow_id" value="{$flow_id|default=0}">
                        <input type="hidden" id="url" value="{:U('getAjaxPage')}">
                        <!--是否为设计流程自动选人的参数-->
                        <input type="hidden" id="flow_type" value="{$flow_type|default=0}"/>
                        <!--流程查询选项人员时的参数-->
                        <input type="hidden" id="one" value="{$one}">
                        <!--流程表单中增加选择人员控件-->
                         <input type="hidden" id="form" value="{$form}">
                    </div>
                </div>
            </div>
            <div class="page">{$pages}</div>
            <div class="sure_submit" style="text-align: center">
                <a class="sure pointer submitRole" style="margin-right:10px">确定</a>
                <a class="sure pointer cancel" >取消</a>
            </div>
        </form>
        <elseif condition="$type eq 2" />
        <div class="bounced select_peo">
            <form id="prcsForm">
                <ul class="flow2">
                    <foreach name="runs" item="run">
                        <li>
                            <input type="radio" name="flow_prcs" value="{$run.prcs_id}"/>
                        <sapn class="flowName" data-url="{:U('Flow/backFlow',array('run_id'=>$run['run_id'],'prcs_id'=>$run['prcs_id'],'flow_prcs'=>$run['prcs_id'],'current_prcs_id'=>$currPrcsId,'current_flow_prcs'=>$currFlowPrcs))}">{$run.prcs_name}</span>
                            </li>
                    </foreach>
                </ul>
            </form>
            <div class="sure_submit" style="text-align: center">
                <a class="sure pointer submitBack" style="margin-right:10px">确定</a>
                <a class="sure pointer cancel" >取消</a>
            </div>
        </div>
        <elseif condition="$type eq 3" />
        <div class="people_main">
            <!--<p style="font-size:1.4em;font-weight: bold">全部部门</p>-->
            <div class="select_people" style="margin-left:7%;">
                <div class="checkUser dd add-all-dept"><a>全部添加</a></div>
                <div class="checkUser qk add-del-dept"><a>全部删除</a></div>
            </div>
            <div class="select_peo select_dept" style='overflow:auto;overflow-y：scroll;height:298px'>
                <ul>
                    <!--<li class="pointer" data-id="ALL_DEPT"><span class="all-line">全体部门</span></li>-->
                    <foreach name="depts" item="dept">
                        <li class="pointer" data-id="{$dept.dept_id}">
                            <span class="all-line">{$dept.dept_name}</span>
                        </li> 
                    </foreach>
                </ul>
            </div>
            <div class="sure_submit" style="text-align: center;margin-top:30px">
                <input type="hidden" id="field" value="{$field}">
                <a class="sure pointer submitDept" style="margin-right:10px">确定</a>
                <a class="sure pointer cancel" >取消</a>
            </div>
        </div>
        <elseif condition="$type eq 4" />
        <form id="diaryForm" method="post" action="{U('Personal/commentDiary')}">
            <div id="comment_content"><textarea style="width:80%;height:10em;border:1px solid #CFDDEA;margin-left: 10%;margin-top: 5px;"></textarea></div>
            <div class="sure_submit" style="text-align: center;">
                <a class="sure pointer submitCommentDiary" style="margin-right:10px" data-url="{:U('Personal/commentDiary',array('comment_id'=>$comment_id,'dia_id'=>$dia_id))}">确定</a>
                <a class="sure pointer cancel" >取消</a>
            </div>
        </form>
        <elseif condition="$type eq 5" />
        <div class="people_main">
            <div class="content" style="text-align: center">
                <textarea class="feedback" id="content" alt='批注' style="width:90%;height:18em;"></textarea>
            </div>
            <div class="sure_submit" style="text-align: center">
                <input type="hidden" class="plan_id" value="{$id}">
                <input type="hidden" class="is_end" value="{$is_end}">
                <input type="hidden" class="dept" value="{$dept}">
                <input type="hidden" class="cType" value="{$cType}">
                <input type="hidden" class="lng" value="" />
                <input type="hidden" class="lat" value="" />
                <a class="sure pointer submitComment" style="margin-right:10px" data-url="{:U('Plan/comment')}">确定</a>
                <a class="sure pointer cancel" >取消</a>
            </div>
        </div>
        <elseif condition="$type eq 6" />
        <form>
            <div id="reply_content"><textarea name="content" style="width:80%;height:10em;border:1px solid #CFDDEA;margin: 3% 10%;"></textarea></div>
            <div class="sure_submit" style="text-align: center">
                <input type="hidden" name="dia_id" value="{$dia_id}">
                <input type="hidden" name="comment_id" value="{$comment_id}">
                <a class="sure pointer submitReplyDiary" style="margin-right:10px" data-url="{:U('Personal/replyDiary',array('comment_id'=>$comment_id))}">确定</a>
                <a class="sure pointer cancel" >取消</a>
            </div>
        </form>
        <elseif condition="$type eq 7" />
        <div class="people_main" style="margin:0;height:400px">
            <div class="select_people" style="margin-left:5em">
                <div class="checkUser dd add-all-priv"><a>全部添加</a></div>
                <div class="checkUser qk add-del-dept"><a>全部删除</a></div>
            </div>
            <div class="select_peo">
                <ul style="overflow: auto;height:336px">
                    <foreach name="privs" item="priv">
                        <li class="pointer" data-id="{$priv.user_priv}">
                            <span class="all-line-priv">{$priv.priv_name}</span>
                        </li> 
                    </foreach>
                </ul>
            </div>
            <div class="sure_submit" style="text-align: center">
                <input type="hidden" id="key_id" value="{$key_id}">
                <input type="hidden" id="field" value="{$field}">
                <a class="sure pointer submitRole" style="margin-right:10px">确定</a>
                <a class="sure pointer cancel" >取消</a>
            </div>
        </div>
        <elseif condition="$type eq 8" />
        <form>
            <div class="verifyArea">
                <table>
                    <tr>
                        <td width="30%">标题：</td>
                        <td>{$data.subject}</td>
                    </tr>
                    <tr>
                        <td width="30%">发布人：</td>
                        <td>{$data.from_id|getChineseName}</td>
                    </tr>
                    <tr>
                        <td width="30%">发布范围：</td>
                        <td>
                    <if condition="$data['to_id'] neq ''">
                        <font style='color:#1781d0;font-weight:bolder;'>部门：</font>{$data.to_id|getMoreDeptname}<br>
                    </if>
                    <if condition="$data['priv_id'] neq ''">
                        <font style='color:#1781d0;font-weight:bolder;'>角色：</font>{$data.priv_id|getMorePrivname}<br>
                    </if>
                    <if condition="$data['user_id'] neq ''">
                        <font style='color:#1781d0;font-weight:bolder;'>人员：</font>{$data.user_id|getMoreUsername}
                    </if>
                    </td>
                    </tr>
                    <tr>
                        <td width="30%">发布时间：</td>
                        <td><input class="datepickerInput" data-type="1" type="text" name="SEND_TIME" value="{$data.send_time}"></td>
                    </tr>
                    <tr>
                        <td width="30%">生效日期：</td>
                        <td><input class="datepickerInput" type="text" data-type="0" name="BEGIN_DATE" value="{$data.begin_date}"></td>
                    </tr>
                    <tr>
                        <td width="30%">终止日期：</td>
                        <td><input class="datepickerInput" type="text" data-type="0" name="END_DATE" value="{$data.end_date}"></td>
                    </tr>
                    <!--                    <tr>
                                            <td width="30%">置顶：</td>
                                            <td>
                                                <input type="checkbox" name="TOP" style='width:16px;' vlaue='{$notify.top}' {$notify['top'] ? 'checked' :''}>设置为置顶 
                                                <input type="text" name="TOP_DAYS" style="width:30px" value='{$notify.top_days}'>天后结束置顶
                                            </td>
                                        </tr>-->
                    <tr>
                        <td width="30%">是否批准：</td>
                        <td>
                            <input type="radio" name="PUBLISH" value="1" class="pass">批准
                            <input type="radio" name="PUBLISH" value="3" class="noPass" style="margin-left:3em;">不批准
                        </td>
                    </tr>
                    <tr class="valid_textarea">
                        <td width="30%">意见：</td>
                        <td><textarea name="REASON" id="reason"></textarea></td>
                    </tr>
                </table>
            </div>
            <div class="sure_submit" style="text-align: center">
                <if condition="$table eq 'notify'">
                    <input type="hidden" name="notify_id" value="{$data.notify_id}">
                    <a class="sure pointer submitVerify" style="margin-right:10px" data-url="{:U('Erp/noticeApprove')}">确定</a>
                    <elseif condition="$table eq 'document'" />
                    <input type="hidden" name="document_id" value="{$data.document_id}">
                    <a class="sure pointer submitVerify" style="margin-right:10px" data-url="{:U('Erp/documentApprove')}">确定</a>
                </if>

                <a class="sure pointer cancel" >取消</a>
            </div>
        </form>
        <elseif condition="$type eq 9" />
        <div id="reason_cont">
            <p><font color="#1781d0">{$data.auditer|getChineseName}</font>&nbsp;&nbsp;领导的审批意见：</p>
            <div>{$data.reason}</div>
        </div>
        <elseif condition="$type eq 10" />
        <ul class="">
            <foreach name="months" item="month" key="key">
                <li class="checkMonth pointer" data-month="{$key}">{$month}</li>
            </foreach>
        </ul>
        <input type="hidden" id="monthUrl" value="{:U('Plan/historyList')}">
        <elseif condition="$type eq 11" />
        <div class="content" style="padding: 10px 15px">
            <h2>流程名称：{$info.flow_name}</h2>
            <div>
                <p style="color:#3f9bca;margin-top:15px;font-size:18px;line-height:50px;font-weight: bold">说明文字</p>
                <div>{$info.flow_desc|default="无说明文字"}</div>
            </div>
            <div style="margin-top:15px">
                <p style="color:#3f9bca;margin-top:15px;font-size:18px;line-height:50px;font-weight: bold">说明文档</p>
                <div>
                    <if condition="$info['uploads'] neq null">
                        <a href="{$info.uploads_url}" download="{$info.uploads}">{$info.uploads}</a>
                        <else/>
                        <span>无说明文档</span>
                    </if>
                </div>
            </div>
        </div>
        <elseif condition="$type eq 12" />
        <form id="newsForm" method="post" action="{U('News/replyComment')}">
            <div><textarea id="reply_content" style="width:80%;height:10em;border:1px solid #CFDDEA;margin-left: 10%;"></textarea></div>
            <div class="sure_submit" style="text-align: center">
                <a class="sure pointer submitReplyNews" style="margin-right:10px" data-url="{:U('Personal/replyComment',array('comment_id'=>$comment_id,'news_id'=>$news_id))}">确定</a>
                <a class="sure pointer cancel" >取消</a>
            </div>
        </form>
        <elseif condition="$type eq 13" />
        <link rel="stylesheet" href="/Public/Admin/css/style.css"/>
        <div class="verifyArea">
            <!-- 表单项 -->
            <form id="flowPriv">
                <div class="power-layer">
                    <div class="layui-form-item">
                        <label class="layui-form-label">授权类型</label>
                        <div class="layui-input-block">
                            <select name="priv_type" class="">
                                <option value="0" {$priv['priv_type'] == 0 ? 'selected' : ''}>全部</option>
                                <!--<option value="1">管理</option>-->
                                <!--<option value="2">监控</option>-->
                                <option value="3" {$priv['priv_type'] == 3 ? 'selected' : ''}>查询</option>
                                <!--                                <option value="4">编辑</option>
                                                                <option value="5">点评</option>-->
                            </select>
                        </div>
                    </div>
                </div>
                <div class="power-layer">
                    <div class="layui-form-item">
                        <label class="layui-form-label">管理范围</label>
                        <div class="layui-input-block">
                            <select name="priv_scope" class="">
                                <option value="ALL_DEPT" {$priv['priv_scope'] == 'ALL_DEPT' ? 'selected' : ''}>全体部门</option>
                                <option value="SELF_ORG" {$priv['priv_scope'] == 'SELF_ORG' ? 'selected' : ''}>本机构</option>
                                <option value="SELF_DEPT" {$priv['priv_scope'] == 'SELF_DEPT' ? 'selected' : ''}>本部门及下属部门</option>
                                <option value="SELF_BRANCH" {$priv['priv_scope'] == 'SELF_BRANCH' ? 'selected' : ''}>本部门（不含下属部门）</option>
                                <option value="CUSTOM" {$priv['priv_scope'] == 'CUSTOM' ? 'selected' : ''}>自定义部门</option>
                            </select>
                        </div>
                    </div>
                </div>
                <div class="power-layer">
                    <div class="layui-form-item">
                        <label class="layui-form-label">授权范围（人员）</label>
                        <div class="layui-input-block value">
                            <div class="auto_user textarea">
                                <span></span>
                                <if condition="$priv['users'] neq null">
                                    <foreach name="priv.users" item='user'>
                                        <span style="padding-right:10px">
                                            <a>{$user|getChineseName}</a><img class="pointer delOperator" data-id="{$user}" src="/Public/Index/img/close_red.png" alt="close" width="12">
                                            <input type="hidden" name="user_ids[]" value="{$user}">
                                            <input type="hidden" name="user_names[]" value="{$user|getChineseName}">
                                        </span> 
                                    </foreach>
                                </if>
                            </div>
                            <a class="pointer flowCheckUser" style="vertical-align: bottom;display:inline-block"><img src="/Public/Admin/images/add.png"/> 添加&nbsp;&nbsp;</a>
                            <a class="pointer clearData" style="vertical-align: bottom;display:inline-block"><img src="/Public/Admin/images/del1.png"/> 清空</a>
                        </div>
                        <!--定义数据表中的键名-->
                        <input type="hidden" id="userField" value="user" />
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">授权范围（部门）</label>
                        <div class="layui-input-block value">
                            <div class="textarea depart">
                                <span></span>
                                <if condition="$priv['depts'] neq null">
                                    <foreach name="priv.depts" item='dept'>
                                        <span style="padding-right:10px">
                                            <a>{$dept|getDeptName}</a><img class="pointer delOperator" data-id="{$dept}" src="/Public/Index/img/close_red.png" alt="close" width="12">
                                            <input type="hidden" name="dept[]" value="{$dept}">
                                            <input type="hidden" name="dept_name[]" value="{$dept|getDeptName}">
                                        </span> 
                                    </foreach>
                                </if>
                            </div>
                            <a class="pointer addDept" style="vertical-align: bottom;display:inline-block"><img src="/Public/Admin/images/add.png"/> 添加&nbsp;&nbsp;</a>
                            <a class="pointer clearData" style="vertical-align: bottom;display:inline-block"><img src="/Public/Admin/images/del1.png"/> 清空</a>
                        </div>
                        <!--定义数据表中的键名-->
                        <input type="hidden" id="deptField" value="dept" />
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">授权范围（角色）</label>
                        <div class="layui-input-block value">
                            <div class="textarea priv">
                                <span></span>
                                <if condition="$priv['roles'] neq null">
                                    <foreach name="priv.roles" item='prive'>
                                        <span style="padding-right:10px">
                                            <a>{$prive|getPrivName}</a><img class="pointer delOperator" data-id="{$prive}" src="/Public/Index/img/close_red.png" alt="close" width="12">
                                            <input type="hidden" name="role[]" value="{$prive}">
                                            <input type="hidden" name="priv_name[]" value="{$prive|getPrivName}">
                                        </span> 
                                    </foreach>
                                </if>
                            </div>
                            <a class="pointer addPriv" style="vertical-align: bottom;display:inline-block"><img src="/Public/Admin/images/add.png"/> 添加&nbsp;&nbsp;</a>
                            <a class="pointer clearData" style="vertical-align: bottom;display:inline-block"><img src="/Public/Admin/images/del1.png"/> 清空</a>
                        </div>
                        <!--定义数据表中的键名-->
                        <input type="hidden" id="field" value="role" />
                    </div>
                </div>
                <div class="sure_submit" style="text-align: center">
                    <input type="hidden" name="id" value="{$id|default=0}" />
                    <a class="sure pointer submitFlowPriv" style="margin-right:10px" data-url="{:U('Flow/flowPriv')}">确定</a>
                    <a class="sure pointer cancel" >取消</a>
                </div>
                <!--加前缀为了区分选人弹窗是否有主办，name="flow_id"有主办选项，此处不需要-->
                <input type="hidden" name="pro_flow_id" value="{$flow_id}">
            </form>
        </div>
        <elseif condition="$type eq 14" />
        <!--设计流程中的预览表单-->
        <link href="/Public/Admin/css/form.css" rel="stylesheet" /> 
        <link href="/Public/Admin/css/layer.css" rel="stylesheet" />
        <div class="layui-tab-content larry-personal-body clearfix mylog-info-box">
            <div class="layui-tab-item layui-field-box layui-show" >
                <div style="font-size:14px;" class="form">
                    {$design_content}
                </div>
            </div>
        </div>
        <elseif condition="$type eq 15" />
        <style>
            .box .icon-date{
                background:url('/Public/Admin/images/date.png') no-repeat right center;
                width: 25px;
                height: 25px;
                position: absolute;
                top: 2px;
                right: 25px;
                cursor:pointer;
            }
        </style>
        <form>
            <div class="dirayArea">
                <div class="layui-form-item">
                    <label class="layui-form-label">标题</label>
                    <div class="layui-input-block box" style="position: relative;width:200px;">
                        <i class='icon-date datepickerInput' id="diary_date"></i>
                        <input name="SUBJECT" id="subject" class="layui-input" <if condition="$dia_id eq ''">value='{$subject}'<else />value='{$diary.subject}'</if> style="display:inline;">
                    </div>
                </div>
                <div class="layui-form-item layui-form-text">
                    <label class="layui-form-label">内容</label>
                    <div class="layui-input-block">
                        <textarea name="CONTENT" id="content" style="width:100%;height:200px">{$diary.content}</textarea>
                    </div>
                </div>
            </div>
            <div class="sure_submit" style="text-align: center">
                <input type='hidden' name='dia_id' value='{$diary.dia_id}'>
                <input type='hidden' name='type' value='1'>
                <a class="sure pointer btn-submit ajax-post" data-url="{:U('Personal/saveDiary',array('type'=>1))}" data-form="">提交</a>
                <a class="sure pointer cancel" >取消</a>
            </div>
        </form>
        <script type="text/javascript" src="/Public/Admin/js/common.js" ></script>
        <elseif condition="$type eq 16" />
        <form>
            <div class="g-content" style="padding:15px">
                <div class="verifyArea">
                    <table>
                        <tr style="font-weight: bold;text-align: center">
                            <td>名称</td>
                        <if  condition="$ctrl eq 'plan'">
                            <td>模式</td>
                        </if>
                        <td>操作</td>
                        </tr>
                        <foreach name="cates" item="cate">
                            <tr>
                                <td class="left" align="center">
                                    <span>{$cate.name}</span>
                                    <input type="text" name="name[]" value="{$cate.name}" class="hide" style="width:120px">
                                    <input type="hidden" name="id[]" value="{$cate.id}">
                                </td>
                            <if  condition="$ctrl eq 'plan'">
                                <td class="middle">
                                    <span>{$cate.mode}</span>
                                    <input type="text" name="editmode[]" value="{$cate.mode}" class="hide" style="width:10px">
                                </td>
                            </if>
                            <td class="right" align="center">
                                <a class="editGoodsCate pointer">编辑&nbsp;&nbsp;</a>
                                <a class="delCate pointer" data-url="{:U('delCate',array('id'=>$cate['id'],'ctrl'=>$ctrl))}">删除</a>
                            </td>
                            </tr>
                        </foreach>
                        </tbody>
                    </table>
                </div>
                <div class="g-input">
                    <span style="font-size: 13px">类别名称：</span>
                    <input type="text" name="addname" value="" style="padding:5px" />
                </div>
                <if condition="$ctrl eq 'plan'">
                    <div class="g-input">
                        <span style="font-size: 13px">模式：</span>
                        <input type="radio" name="mode" value="0">简洁模式
                        <input type="radio" name="mode" value="1" style="margin-left:15px;" checked="true">标准模式
                    </div>
                </if>
            </div>
            <div class="sure_submit" style="text-align: center">
                <input type="hidden" name="ctrl" value="{$ctrl}" />
                <a class="sure pointer btn-submit ajax-post" data-url="{:U('Base/saveCate')}" data-form="">提交</a>
                <a class="sure pointer cancel" >取消</a>
            </div>
        </form>
        <script type="text/javascript" src="/Public/Admin/js/common.js" ></script>
        <elseif condition="$type eq 17" />
        <form>
            <div class="g-content" style="padding:15px">
                <div class="verifyArea">
                    <table>
                        <tr style="font-weight: bold;text-align: center">
                            <td>分组名称</td>
                            <td>操作</td>
                        </tr>
                        <foreach name="groups" item="group">
                            <tr>
                                <td class="left" align="center">
                                    <span>{$group.group_name}</span>
                                    <input type="text" name="name[]" value="{$group.group_name}" class="hide" style="width:120px">
                                    <input type="hidden" name="id[]" value="{$group.id}">
                                </td>
                                <td class="right" align="center">
                                    <a class="editGoodsCate pointer">编辑&nbsp;&nbsp;</a>
                                    <a class="delete pointer" data-url="{:U('Erp/delGroup',array('id'=>$cate['id']))}">删除</a>
                                </td>
                            </tr>
                        </foreach>
                        </tbody>
                    </table>
                </div>
                <div class="g-input">
                    <span style="font-size: 13px">分组名称：</span>
                    <input type="text" name="group_name" value="" style="padding:5px" />
                </div>
            </div>
            <div class="sure_submit" style="text-align: center">
                <a class="sure pointer btn-submit ajax-post" data-url="{:U('Erp/saveGroup')}" data-form="">提交</a>
                <a class="sure pointer cancel" >取消</a>
            </div>
        </form>
        <script type="text/javascript" src="/Public/Admin/js/common.js" ></script>
        <elseif condition="$type eq 18" />
        <form>
            <div class="g-content" style="padding:15px">
                <div class="g-input">
                    <span style="font-size: 13px">分类名称：</span>
                    <input type="text" name="sort_name" value="{$info.sort_name}" style="padding:5px" />
                </div>
                <div class="g-input">
                    <span style="font-size: 13px">分类排序：</span>
                    <input type="text" name="sort_no" value="{$info.sort_no}" style="padding:5px" />
                </div>
                <div class="g-input">
                    <span style="font-size: 13px">所属部门：</span>
                    <select name="dept_id">
                        <option value="0">全体部门</option>
                        <foreach name="depts" item="dept">
                            <option value="{$dept.dept_id}">{$dept.dept_name}</option>
                        </foreach>
                    </select>
                </div>
            </div>
            <div class="sure_submit" style="text-align: center">
                <input type="hidden" name="ctrl" value="{$ctrl}" />
                <input type="hidden" name="id" value="{$info.sort_id|default=0}">
                <a class="sure pointer btn-submit ajax-post" data-url="{:U('Flow/setCate')}" data-form="">提交</a>
                <a class="sure pointer cancel" >取消</a>
            </div>
        </form>
        <script type="text/javascript" src="/Public/Admin/js/common.js" ></script>
        <elseif condition="$type eq 19" />
        <form>
            <div class="g-content" style="padding:15px;overflow-y:scroll; width:519px; height:210px;">
                <div class="g-input">
                    <textarea name="content" placeholder="请描述问题……" style="width:80%;height:10em;border:1px solid #CFDDEA;margin-left: 10%;margin-top: 5px;"></textarea>
                </div>
                <div class="g-input">
                    <a href="#" id="upload" style='margin-top: 7px;display: inline-block;font-size: 12px;margin-left: 10%;'><span class="fj">上传图片</span><span class="icon_add">&#xe638;</span></a>
                    <div class="filename-cont" style="margin-left: 10%;">
                        <span><if condition="$info.uploads neq ''">{$info.uploads}<img src="/Public/Index/img/close.png" style="width:15px" class="pointer delfile" data-fileurl="{$info.uploads_url}"/></if></span>
                    </div>
                    <input type="file" id="inputImage" name='imgfile' style="display:none">
                    <input type="hidden" id="filename" name="uploads" value="{$info.uploads}">
                    <input type="hidden" id="fileurl" name="uploads_url" value="{$info.uploads_url}">
                    <input type="hidden" name="url" value="{:U('Base/delFile',array('table'=>'notify','field'=>'notify_id','id'=>$notify_id))}">
                </div>
            </div>
            <div class="sure_submit" style="text-align: center">
                <input type="hidden" name="id" value="{$questionId}">
                <a class="sure pointer btn-submit ajax-post" data-url="{:U('Index/question')}" data-form="">提交</a>
                <a class="sure pointer cancel" >取消</a>
            </div>
        </form>
        <script type="text/javascript" src="/Public/Admin/js/common.js" ></script>
        <elseif condition="$type eq 20" />
        <form>
            <div class="g-content" style="padding:15px;overflow-y:scroll; width:519px; height:365px;">
                <div class="g-input">
                    <ul class='advice'>
                        <foreach name="list" item="advice" key="key">
                            <li>
                                <div class='detailInfo'>
                                    <span>{$key+1}.</span>
                                    <span style='color:#5091CB'>{$advice.user_id|getChineseName}</span>
                                    <span>时间：{$advice.create_time}</span>
                                    <if condition='$is_handle eq 0'>
                                        <span class="pointer delQuestion" style='margin-left:5px;color:#5091CB' data-id="{$advice.id}" data-url="{:U('delQuestion')}">删除</span>
                                    </if>
                                    <p></p>
                                    <span style="display:block;margin-left: 2rem;">{$advice.content}</span>
                                    <if condition="$advice.uploads_url neq ''">
                                        <foreach name='advice.uploads_url' item="file">
                                            <a href='{$file}' target='self'><img src="{$file}" style='width:50px;height: 50px;margin-right: 5px;'></a>
                                        </foreach>
                                    </if>
                                    <notempty name='advice["reply"]'>
                                        <ul class='feed'>
                                            <foreach name="advice['reply']" item="feed" key="key">
                                                <li>
                                                    <span style='display: block;'>【反馈({$key+1})】：</span>
                                                    <span style='color:#5091CB;margin-left: 2rem'>{$feed.user_id|getChineseName}</span>
                                                    <span>时间：{$feed.create_time}</span>
                                                    <if condition='$is_handle eq 1'>
                                                        <span class="pointer delQuestion" style='margin-left:5px;color:#5091CB' data-id="{$feed.id}" data-url="{:U('delQuestion')}">删除</span>
                                                    </if>
                                                    <p></p>
                                                    <span style="display:block;margin-left: 3rem;">{$feed.content}</span>
                                                </li>
                                            </foreach>
                                        </ul>
                                    </notempty>
                                    <if condition='$is_handle eq 1'>
                                        <span class="submitAdvice pointer" style="display:inline-block;float: right;color:#5091CB;" data-id="{$advice.id}" data-url="{:U('question')}">答复</span>
                                    </if>
                                    <p style="clear:both;"></p>
                                </div>
                            </li>
                        </foreach>
                    </ul>
                </div>
            </div>
        </form>
        <script type="text/javascript" src="/Public/Admin/js/common.js" ></script>
    </if>

    <script src="https://api.map.baidu.com/api?v=2.0&ak=ZoVYMpI2FZWKafTn6GIjojqinVFGHMbI&s=1" type="text/javascript"></script>  
    <script type="text/javascript" src="http://developer.baidu.com/map/jsdemo/demo/convertor.js"></script> 
    <script type="text/javascript" src="/Public/static/dropload/dropload.js" ></script>
    <script type="text/javascript" src="/Public/Admin/js/flow.js"></script>

    <!--编辑器-->
    <script type="text/javascript" src="__PUBLIC__/static/ueditor/ueditor.config.js"></script>
    <script type="text/javascript" src="__PUBLIC__/static/ueditor/ueditor.all.min.js"></script>
    <script  type="text/javascript">
        $(initAddCate());
        $(initLayer());
        $(dateTime(0));
        $(initFlowStep());
        $(initUpload("{:U(CONTROLLER_NAME.'/upload')}","advice"));
        $(function () {
            $('#testTime').datetimepicker({
                format: "Y-m-d", ////格式化日期
                lang: 'ch', //设置语言
                timepicker: false, //关闭时间选项
            });

            var geolocation = new BMap.Geolocation();
            geolocation.getCurrentPosition(function (r) {
                if (this.getStatus() == BMAP_STATUS_SUCCESS) {
                    var mk = new BMap.Marker(r.point);
                    lat = r.point.lat; //纬度
                    lng = r.point.lng;   //经度
                    $('body').find('.lng').val(lng);
                    $('body').find('.lat').val(lat);
                }
            })

        })

//        var width = $('#content').width();
//        var ue = UE.getEditor('content', {
//            initialFrameWidth: width,
//            initialFrameHeight: 200,
//            toolbars: [[
//                    "source","insertunorderedlist", "insertorderedlist", "unlink", "link",
//                    "searchreplace", "preview", "pagebreak", "simpleupload", "emotion",
//                    "date", "time", "horizontal", "pasteplain",
//                    "bold", "italic", "underline", "strikethrough", "forecolor", "backcolor",
//                    "superscript", "subscript", "justifyleft", "justifycenter", "justifyright", "justifyjustify",
//                    "formatmatch", "removeformat", "lineheight", "fontfamily", "fontsize",
//                ]],
//        });

    </script>
</body>
</html>
